package com.fy.fyai.common.enums;

import lombok.Getter;

/**
 * AI模型枚举
 * 定义所有可用的聊天模型
 *
 * @author fwq
 * @date 2025-10-25
 */
@Getter
public enum AiModelEnum {

    DEEPSEEK_R1("deepseek-r1:7b", "DeepSeek R1 7B", "推理能力强，适合复杂问题"),
    GEMMA_2B("gemma:2b", "Gemma 2B", "轻量快速，适合简单问题"),
    LLaMA_3_1("llama3.1:latest", "LLaMA 3.1", "最新版LLaMA模型，性能强劲");

    /**
     * 模型名称（配置文件中的值）
     */
    private final String modelName;

    /**
     * 显示名称
     */
    private final String displayName;

    /**
     * 描述
     */
    private final String description;

    AiModelEnum(String modelName, String displayName, String description) {
        this.modelName = modelName;
        this.displayName = displayName;
        this.description = description;
    }

    /**
     * 根据模型名称获取枚举
     */
    public static AiModelEnum getByModelName(String modelName) {
        for (AiModelEnum model : values()) {
            if (model.modelName.equals(modelName)) {
                return model;
            }
        }
        return null;
    }
}
